package com.visikard.item;

import java.io.Serializable;

import org.json.JSONException;
import org.json.JSONObject;

import com.visikard.application.Constant;

public class StaffAccountObj implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private long idStaff;
	private String merchantCode;
	private String storeCode;
	private String fname;
	private String lname;
	private String email;
	private long merchantId;
	private long storeId;
	private String storeLocation;
	private String reportManager;
	private String pin;
	private String merchantLogo;
	private String merchantType;
	private String merchantName;

	public StaffAccountObj() {
		idStaff = Constant.INVALID_ID;
		merchantCode = "";
		storeCode = "";
		fname = "";
		lname = "";
		email = "";
		merchantId = Constant.INVALID_ID;
		storeId = Constant.INVALID_ID;
		storeLocation = "";
		reportManager = "";
		pin = "";
		merchantLogo = "";
		merchantType = "";
		merchantName = "";
	}

	public StaffAccountObj(JSONObject jobject) throws JSONException {
		if (jobject == null)
			return;

		idStaff = jobject.optLong("idStaff", Constant.INVALID_ID);
		merchantCode = jobject.optString("merchantCode", "");
		storeCode = jobject.optString("storeCode", "");
		fname = jobject.optString("fname", "");
		lname = jobject.optString("lname", "");
		email = jobject.optString("email", "");
		merchantId = jobject.optLong("merchantID", Constant.INVALID_ID);
		storeId = jobject.optLong("storeID", Constant.INVALID_ID);
		storeLocation = jobject.optString("storeLocation", "");
		reportManager = jobject.optString("reportManager", "");
		pin = jobject.optString("pin", "");
		merchantLogo = jobject.optString("merchantLogo", "");
		merchantType = jobject.optString("merchantType", "");
		merchantName = jobject.optString("merchantName", "");
	}

	public long getIdStaff() {
		return idStaff;
	}

	public void setIdStaff(long idStaff) {
		this.idStaff = idStaff;
	}

	public String getMerchantCode() {
		return merchantCode;
	}

	public void setMerchantCode(String merchantCode) {
		this.merchantCode = merchantCode;
	}

	public String getStoreCode() {
		return storeCode;
	}

	public void setStoreCode(String storeCode) {
		this.storeCode = storeCode;
	}

	public String getFname() {
		return fname;
	}

	public void setFname(String fname) {
		this.fname = fname;
	}

	public String getLname() {
		return lname;
	}

	public void setLname(String lname) {
		this.lname = lname;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public long getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(long merchantId) {
		this.merchantId = merchantId;
	}

	public long getStoreId() {
		return storeId;
	}

	public void setStoreId(long storeId) {
		this.storeId = storeId;
	}

	public String getStoreLocation() {
		return storeLocation;
	}

	public void setStoreLocation(String storeLocation) {
		this.storeLocation = storeLocation;
	}

	public String getReportManager() {
		return reportManager;
	}

	public void setReportManager(String reportManager) {
		this.reportManager = reportManager;
	}

	public String getPin() {
		return pin;
	}

	public void setPin(String pin) {
		this.pin = pin;
	}

	public String getMerchantLogo() {
		return merchantLogo;
	}

	public void setMerchantLogo(String merchantLogo) {
		this.merchantLogo = merchantLogo;
	}

	public String getMerchantType() {
		return merchantType;
	}

	public void setMerchantType(String merchantType) {
		this.merchantType = merchantType;
	}

	public String getMerchantName() {
		return merchantName;
	}

	public void setMerchantName(String merchantName) {
		this.merchantName = merchantName;
	}

}
